/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package envasesdeleste.dom;

import envasesdeleste.dom.gest.GestArticulo;
import java.util.Iterator;
import java.util.Map;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Enrico
 */
public class Utilitaria {
    
    public static void listarArticulosJTable(DefaultTableModel modelo){
        
            Iterator it = GestArticulo.getInstance().devolverTodos().entrySet().iterator();
            while (it.hasNext()) {
            Map.Entry e = (Map.Entry)it.next();
            Articulo a = (Articulo) e.getValue();
            Object[] oA = {a.getCod(),a.getDescripcion(),a.getCategoria().getNom(),a.getPrecioCosto(),a.getPrecioVenta()};
            modelo.addRow(oA);
        }
    }
    
}
